package com.zhoug.commonlib2;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import com.zhoug.commonlib2.notifycation.TestNotificationActivity;


public class MainActivity extends MyBaseActivity {
    public static Intent targetIntent;

    private Button mBtnNotifycation;

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_main;
    }

    @Override
    protected void findViews() {

        mBtnNotifycation = findViewById(R.id.btn_notifycation);
    }

    @Override
    protected void onCreate1(Bundle savedInstanceState) {
        mBtnNotifycation.setOnClickListener(v -> {
            toActivity(TestNotificationActivity.class);
        });
        toTarget();
    }

    private void toTarget() {
        if (targetIntent != null) {
            Intent intent = targetIntent;
            targetIntent = null;
            startActivity(intent);

        }
    }


}